package commands;

import clientRequest.ClientRequest;
import controller.ExecutorsManager;
import controller.ExecutorsManager.DeleteFileExecutor;

/**
 * class DeleteFileCommand - execute delete file command
 */
public class DeleteFileCommand {
	
	DeleteFileExecutor deleteFileExecutor = ExecutorsManager.getInstance().getDeleteFileExecutor();
	
	/**
	 * constructor
	 */
	public DeleteFileCommand(){}

	/**
	 * delete the user file
	 * @param clientRequest - a client request that contains the file details
	 * @return 1 - if succeed. 0 - if failed. 
	 */
	public int action(ClientRequest clientRequest) 
	{
		// TODO Auto-generated method stub
		return deleteFileExecutor.addRequest(clientRequest.getUserID(), clientRequest.getFileName(),clientRequest.getFilePath(), clientRequest.isMyDropBox());				
	}

}
